home *** CD-ROM | disk | FTP | other *** search
- Path: sundog.tiac.net!champion
- From: champion@tiac.net (ChampionSOFT System Solutions)
- Newsgroups: comp.lang.c
- Subject: Re: SYSTEM CALL in a while loop didn't work
- Date: 8 Feb 1996 19:38:01 GMT
- Organization: The Internet Access Company
- Message-ID: <4fdjep$5so@sundog.tiac.net>
- References: <4f53vi$5uo@bcrkh13.bnr.ca>
- NNTP-Posting-Host: laraby.tiac.net
- X-Newsreader: TIN [version 1.2 PL2]
-
- coopeng (coopeng@bnr.ca) wrote:
- : Hi folks,
- : I am rubing a 13000 records file in a 3 nested while loop
- : eg
- :
- : while()
- : while()
- : */first system call */
- : while()/*rubing*/
- : strstr()
- : */second system call */
-
- : first system call works, but second doesn't. If I comment the third while loop then
- : second while loop also works. I shall be thankful if you guys mail me the
- : solution as soon as possible.
-
- You might want to try this on for size:
-
- while () {
- while() {
- /* first system call */
- while() {
- strstr();
- /* second system call */
- }
- }
- }
-
- What was happening looks like this
-
- while()
- while()
- /* first system call */
- /* endwhile */
-
- while()
- strstr
- /* endwhile */
- /*second system call
-